In the case where an image of a subject is taken when the subject comes into view in fixed-point observation for the purpose of monitoring or authentication, there may arise a demand that only the subject is extracted with a background behind the subject removed.
As a technique for meeting the demand, there is known the following one. That is, in this technique, light emitted from an illumination unit for illuminating a subject coming into camera's view is made to blink, and image taking operation is performed in sync with the blinking of the illumination. Then, a difference in pixel values between an image taken at the light-on time and an image taken at the light-off time is calculated and, based on the calculation result, a background image behind the subject is removed to generate an image in which only the subject remains (hereinafter, referred to as “illumination on/off difference”).
For example, there is known a technique in which an image obtained through the illumination on/off difference is used to acquire a subject image that is not affected by ambient light (refer to, e.g., Patent Document 1). However, in the process of generating such an image based on the illumination on/off difference, when a slight movement of the subject occurs in a short period time between the illumination-on time and illumination-off time, an image in which a subject is blurred is obtained, with the result that the subject may not appropriately be extracted.
Further, as a technique that uses the illumination on/off difference, there is known one that projects dot pattern illumination onto a subject when an abnormal object is detected by a comparison with a previously taken normal image (refer to, e.g., Patent Document 2). In this technique, the illumination on/off difference is used in order to clearly image the dot pattern. Although there are several examples that use the illumination on/off difference to check presence/absence of a subject as described above, these known techniques only check presence/absence of a subject but do not consider the blurring of an image caused due to a movement of the subject.
In addition, a technique is known in which images of a subject are continuously taken at an extremely short time interval so as to keep the movement amount of the subject between the taken images within one pixel to thereby prevent subject blurring. However, when the movement speed of the subject is higher than the image taking speed or when high-speed continuous image taking is difficult due to insufficient illumination, this technique may not prevent the subject blurring completely. In particular, when the subject is close to a camera, the subject blurring is likely to get worse.
In the filed of video encoding such as MPEG, there is known a motion detection technique that performs block matching processing for partial images to calculate the movement direction or movement amount of a moving object in the video. However, the block matching processing generally involves a large amount of calculation, so that dedicated hardware or a CPU capable of performing high-speed mathematical processing is required, resulting in an increase of cost.    Japanese Laid-open Patent Publication No. 10-177449    Japanese Laid-open Patent Publication No. 2001-25001